<%--
 *  File:    uploadErrorMessage.jsp
 *  @Author: beliveli
 *  Date:    2013/06/13
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.uploadErrorMessage"); 

  //init param
  String strModuleName = "DMS";
  String privilegeCode = "Z0837";
  String contextPath = request.getContextPath();
  String checkprocname = "";
  String importprocname = "";
  String strTableName = "";
  if(session.getAttribute("checkprocname")!=null){
	  checkprocname = session.getAttribute("checkprocname").toString();
  }
  if(session.getAttribute("importprocname")!=null){
	  importprocname = session.getAttribute("importprocname").toString();
  }
  
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>uploadErrorMessage</title>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<%@ include file="/inc/CatchError.inc" %>
<script>
function page_sure(){
      document.cform.actionname.value = "loaddata";
      document.cform.target = "_self";
	  isRunning = true;
	  document.cform.submit();
}
function back()
{
	var link="<%=contextPath %>/phap/masterdata/spm/UploadEXL.jsp?<%= OvalTools.randomURL() %>";
	self.location.href=link;
}
</script>
</head>
<body>
<% //--------------------------------------  page location --%>
<%@ include file="/inc/PageLocation.inc" %>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher"  target="_parent">
	<input type="hidden" name="pagename" value="p_loadFile">
	<input type="hidden" name="actionname">
	<input type="hidden" name="dcperiodid">
	<input type="hidden" name="checkprocname" value = "<%=checkprocname %>">
	<input type="hidden" name="importprocname" value = "<%=importprocname %>">
  <tr> 
    <td> 
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
         <tr  class="deepblue-left"> 
            <td width="4%" class="title_center">&nbsp;</td>
            
            <td width="96%" class="title_center"><%= label.getLabelName("L_ConfigName") %></td>
         </tr>
         <%
             int j = 0;
             String strClassType = new String(); 
             String sDefaultCode = "";
             Integer nDefaultConfigid = new Integer(-1); 
             Integer nDefaultStatusid = new Integer(-1);
             boolean bHasChecked = false;
             
             Vector flagerror = (Vector)session.getAttribute("flagerror");
             if(flagerror == null) flagerror = new Vector();
  			if(flagerror == null){
  		%>
  			 <tr onmouseover="this.className='tr-over'" onmouseout="this.className='<%=JspHelper.filterNull(strClassType)%>'">
            <td class="td_center">
              <%=1 %>
            </td>
            <td class="td_center">
              <%=label.getLabelName("L_UploadSuccess") %>
            </td>
            
          	</tr>
  		<%
  			}
          %>
          <logic:iterate id="flagerrorhash" collection="<%= flagerror %>">                      
         <%
            HashMap errorHash = (HashMap)pageContext.getAttribute("flagerrorhash");
            if(errorHash == null) errorHash = new HashMap();
            String strIsChecked = new String("");
            String strIsDisabled = new String("");
          
            if(j%2 == 1){
              strClassType = "td-listrom";             
            }else{                    
              strClassType = "";
            }
            
            if(!bHasChecked)
        	{
          		strIsChecked = "Checked";                       
          		bHasChecked = true;      
        	}
            j++;
            String errorMessageStr = "第"+errorHash.get("rownums")+"行的"+errorHash.get("flag").toString().substring(1);
          %>
           <tr onmouseover="this.className='tr-over'" onmouseout="this.className='<%=JspHelper.filterNull(strClassType)%>'">
            <td class="td_center">
              <%=j %>
            </td>
            <td class="td_center">
              <%=errorMessageStr %>
            </td>
            
          </tr>
          </logic:iterate>
      </table>
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr> 
          <td class="summary_top"></td>
        </tr>
        <tr> 
          <td class="td_center">
            <a onclick="page_sure()"><custom:button type="1" label="L_Confirm" imgsrc="new.gif" border="0" style="width:60"/></a>
            <a onclick="back()"><custom:button type="1" label="L_Cancel" imgsrc="edit.gif" border="0" style="width:60"/></a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </form>
</table>
</body>
</html>